/**
 * @copyright SilverBiology, LLC
 * @website http://www.silverbiology.com
*/

Ext.namespace('Gbif.Glossary')

Gbif.Glossary.InfoPanel = function(config){
		
	Ext.apply(this,config,{
			title: 'Information'
		,	autoLoad: 'docs/header.html'
		,	autoScroll: true
		,	unstyled: true	
		,	iconCls: 'iconText'		
	});

	Gbif.Glossary.InfoPanel.superclass.constructor.call(this,config)

}

Ext.extend( Gbif.Glossary.InfoPanel , Ext.Panel, {

	showInfo: function(id){
		var el = Ext.getDom(id);
		if (el) {
			var top = (Ext.fly(el).getOffsetsTo(this.body)[1]) + this.body.dom.scrollTop;
			this.body.scrollTo('top', top - 25, {
				duration: 0.5,
				callback: function(){
				}
			});
		}
	}

});